<!DOCTYPE HTML>
<html class="no-js">
  
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="common/js/form_init.js" id="form_init_script"
    data-name="">
    </script>
    <link rel="stylesheet" href="<?php echo base_url();?>assets/css/bootstrap.min.css">	
  <style>
    body {
      padding-top: 60px;
      padding-bottom: 40px;
    }
  </style>
  <link rel="stylesheet" href="<?php echo base_url();?>assets/css/main.css">

  <script src="<?php echo base_url();?>assets/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"></script>
  <script src="<?php echo base_url();?>assets/js/restaurant.js"></script>
   <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/test/default.css?version=857"
    id="theme" />
    <title>
    	Danh sách nhân viên
    </title>
  </head>
  <body>
    <?php $this->load->view('supermenu');?>
 
		 <div class="content">
		    <div class="box">
		      <div class="heading">
		        <h1><img src="<?php echo base_url();?>assets/img/users.png" height="25" width="25px">Danh sách nhân viên</h1>
		        <div class="buttons">
		          <a href="<?php echo site_url('user/upload_multi_user')?>" class="button">Thêm nhiều nhân viên</a>
		          <a href="<?php echo site_url('user/create_new_user')?>" class="button">Thêm nhân viên</a>
		          <a onclick="" class="button">Xóa nhân viên</a>
		        </div>    
		      </div><!-- end heading -->
		      <br/>
		      <div class="content">
		        <form action="" method="post" id="form" enctype="mutipart/form-data">
		          <table class="list">
		            <thead>
		              <tr>
		                <td width="1" style="
		                text-align:center"><input type="checkbox" onclick="">
		                </td>
		                <td class="left">
		                  <a href="#">Tên</a>
		                </td>
		                <td class="left">
		                  <a href="#">Họ đệm</a>
		                </td>
		                <td class="left">
		                  <a href="#">Ngày sinh</a>
		                </td>
		                <td class="left">
		                  <a href="#">Địa chỉ</a>
		                </td>
		                <td class="left">
		                  <a href="#">Ảnh đại diện</a>
		                </td>
		                <td class="left">
		                  <a href="#">Số điện thoại</a>
		                </td>
		                <td class="left">
		                  <a href="#">Vị trí</a>
		                </td>
		                <td class="right">
		                  <a href="#">Thao tác</a>
		                </td>
		              </tr>
		            </thead>
		            <tbody>
		             <?php if (is_array($results)) {?>
			            <?php foreach ($results as $data){?>
			              <tr>
			                <td style="
			                text-align:center">
			                  <input type="checkbox" onclick="">
			                </td>
			                <td class="left">
			                 <a href="<?php echo site_url('user/view_profile?id='); echo $data->_id; ?>"><?php echo $data->first_name?></a>
			                </td>
			                <td class="left">
			                 <?php echo $data->last_name?>
			                </td>
			                <td class="left">
			                <?php echo $data->date_of_birth?>
			                </td>
			                <td class="left">
			                 <?php echo $data->address?>
			                </td>
			                <td class="left">
			                 <?php echo $data->image?>
			                </td>
			                <td class="left">
			                 <?php echo $data->phone_number?>
			                </td>
			                <td class="left">
			                 <?php if ($data->role == 1){?>
			                 <?php echo 'admin'?>
			                 <?php }elseif ($data->role == 2){ ?>
			                 <?php echo 'manager'?>
			                 <?php }else{?>
			                 <?php echo 'user'?>
			                 <?php }?>
			                </td>
			                
			                <td class="right">
			                  <a href="<?php echo site_url('user')?>/edit_user?id=<?php echo $data->_id; ?>" ><img src="
			                  <?php echo base_url();?>assets/img/edit.png" height="20" width="20"></a>
			                  <a href="" class="confirm" onclick="deleteUser(<?php echo $data->_id; ?>)" >
			                  <img src="
			                  <?php echo base_url();?>assets/img/delete.png" height="20" width="20"></a>
			                </td>
			              </tr>
			             <?php }?>
		             <?php }?>
		            </tbody>
		          </table>
		        </form><!-- end form -->
		        <div class="pagination">
		          <div class="links">
		           <?php echo $links; ?>
		          </div>
		        </div>
		      </div>
		    </div><!--end box -->
		
		  </div><!-- end content -->
	<?php $info['info'] = 'user';?> 		  
	<?php $this->load->view('delete', $info);?>

<?php $this->load->view('footer');?>